import pygame
from pygame.sprite import Sprite


class DoubleBullet(Sprite):
    """双发子弹类"""

    # 子弹的偏移量
    offset = 30

    def __init__(self, window):
        super().__init__()
        self.image = pygame.image.load("images/double_bullet.png")
        self.window = window
        # 获取子弹的矩形
        self.rect = self.image.get_rect()

    def update(self):
        """更新子弹"""
        self.rect.top -= DoubleBullet.offset
